package com.libapml.indexer;

import java.io.IOException;
import java.io.Reader;
import java.util.Set;

import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.standard.StandardAnalyzer;

public class NGramAnalyzer extends StandardAnalyzer {
	
	public NGramAnalyzer() {}
	
	@SuppressWarnings("unchecked")
	public NGramAnalyzer(Set stopwords) {
		
		super(stopwords);
		
	}
	
	@Override
	public TokenStream reusableTokenStream(String fieldName, Reader reader)
			throws IOException {
		return new NGramTokenFilter(super.reusableTokenStream(fieldName, reader));
	}
	
}
